<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.15"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>CryptoAuthLib: atcacert_client.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
  $(document).ready(initResizable);
/* @license-end */</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">CryptoAuthLib
   </div>
   <div id="projectbrief">Microchip CryptoAuthentication Library</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.15 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('a00182_source.html','');});
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="headertitle">
<div class="title">atcacert_client.h</div>  </div>
</div><!--header-->
<div class="contents">
<a href="a00182.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;</div><div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160;<span class="preprocessor">#ifndef ATCACERT_CLIENT_H</span></div><div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160;<span class="preprocessor">#define ATCACERT_CLIENT_H</span></div><div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160;</div><div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160;<span class="preprocessor">#include &lt;stddef.h&gt;</span></div><div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160;<span class="preprocessor">#include &lt;stdint.h&gt;</span></div><div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="a00194.html">atcacert_def.h</a>&quot;</span></div><div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160;</div><div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;<span class="comment">// Inform function naming when compiling in C++</span></div><div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160;<span class="preprocessor">#ifdef __cplusplus</span></div><div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;<span class="keyword">extern</span> <span class="stringliteral">&quot;C&quot;</span> {</div><div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160;<span class="preprocessor">#endif</span></div><div class="line"><a name="l00042"></a><span class="lineno">   42</span>&#160;</div><div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160;<span class="keywordtype">int</span> <a class="code" href="a00990.html#ga9a6222ede3a3f3f331882b613066b8a8">atcacert_read_device_loc</a>(<span class="keyword">const</span> <a class="code" href="a01049.html">atcacert_device_loc_t</a>* device_loc,</div><div class="line"><a name="l00059"></a><span class="lineno">   59</span>&#160;                             uint8_t*                     data);</div><div class="line"><a name="l00060"></a><span class="lineno">   60</span>&#160;</div><div class="line"><a name="l00083"></a><span class="lineno">   83</span>&#160;<span class="keywordtype">int</span> <a class="code" href="a00990.html#gaaf13dfd0ea4e563194cec6e62892b5c4">atcacert_read_cert</a>(<span class="keyword">const</span> <a class="code" href="a01061.html">atcacert_def_t</a>* cert_def,</div><div class="line"><a name="l00084"></a><span class="lineno">   84</span>&#160;                       <span class="keyword">const</span> uint8_t         ca_public_key[64],</div><div class="line"><a name="l00085"></a><span class="lineno">   85</span>&#160;                       uint8_t*              cert,</div><div class="line"><a name="l00086"></a><span class="lineno">   86</span>&#160;                       <span class="keywordtype">size_t</span>*               cert_size);</div><div class="line"><a name="l00087"></a><span class="lineno">   87</span>&#160;</div><div class="line"><a name="l00099"></a><span class="lineno">   99</span>&#160;<span class="keywordtype">int</span> <a class="code" href="a00990.html#ga71ea9d7c93c2fecb87a36b1343397fad">atcacert_write_cert</a>(<span class="keyword">const</span> <a class="code" href="a01061.html">atcacert_def_t</a>* cert_def,</div><div class="line"><a name="l00100"></a><span class="lineno">  100</span>&#160;                        <span class="keyword">const</span> uint8_t*        cert,</div><div class="line"><a name="l00101"></a><span class="lineno">  101</span>&#160;                        <span class="keywordtype">size_t</span>                cert_size);</div><div class="line"><a name="l00102"></a><span class="lineno">  102</span>&#160;</div><div class="line"><a name="l00114"></a><span class="lineno">  114</span>&#160;<span class="keywordtype">int</span> <a class="code" href="a00990.html#gabd66cb9a5c50c7c62e3bc0a8ff0fc4d6">atcacert_create_csr</a>(<span class="keyword">const</span> <a class="code" href="a01061.html">atcacert_def_t</a>* csr_def, uint8_t* csr, <span class="keywordtype">size_t</span>* csr_size);</div><div class="line"><a name="l00115"></a><span class="lineno">  115</span>&#160;</div><div class="line"><a name="l00127"></a><span class="lineno">  127</span>&#160;<span class="keywordtype">int</span> <a class="code" href="a00990.html#ga0b492025e27a705b1792b6276eeaaf68">atcacert_create_csr_pem</a>(<span class="keyword">const</span> <a class="code" href="a01061.html">atcacert_def_t</a>* csr_def, <span class="keywordtype">char</span>* csr, <span class="keywordtype">size_t</span>* csr_size);</div><div class="line"><a name="l00128"></a><span class="lineno">  128</span>&#160;</div><div class="line"><a name="l00143"></a><span class="lineno">  143</span>&#160;<span class="keywordtype">int</span> <a class="code" href="a00990.html#ga9f7223a578ce5c07a831638106c6ff6c">atcacert_get_response</a>(uint8_t       device_private_key_slot,</div><div class="line"><a name="l00144"></a><span class="lineno">  144</span>&#160;                          <span class="keyword">const</span> uint8_t challenge[32],</div><div class="line"><a name="l00145"></a><span class="lineno">  145</span>&#160;                          uint8_t       response[64]);</div><div class="line"><a name="l00146"></a><span class="lineno">  146</span>&#160;</div><div class="line"><a name="l00148"></a><span class="lineno">  148</span>&#160;<span class="preprocessor">#ifdef __cplusplus</span></div><div class="line"><a name="l00149"></a><span class="lineno">  149</span>&#160;}</div><div class="line"><a name="l00150"></a><span class="lineno">  150</span>&#160;<span class="preprocessor">#endif</span></div><div class="line"><a name="l00151"></a><span class="lineno">  151</span>&#160;</div><div class="line"><a name="l00152"></a><span class="lineno">  152</span>&#160;<span class="preprocessor">#endif</span></div><div class="ttc" id="a00990_html_ga71ea9d7c93c2fecb87a36b1343397fad"><div class="ttname"><a href="a00990.html#ga71ea9d7c93c2fecb87a36b1343397fad">atcacert_write_cert</a></div><div class="ttdeci">int atcacert_write_cert(const atcacert_def_t *cert_def, const uint8_t *cert, size_t cert_size)</div><div class="ttdoc">Take a full certificate and write it to the ATECC508A device according to the certificate definition.</div><div class="ttdef"><b>Definition:</b> atcacert_client.c:169</div></div>
<div class="ttc" id="a00990_html_gabd66cb9a5c50c7c62e3bc0a8ff0fc4d6"><div class="ttname"><a href="a00990.html#gabd66cb9a5c50c7c62e3bc0a8ff0fc4d6">atcacert_create_csr</a></div><div class="ttdeci">int atcacert_create_csr(const atcacert_def_t *csr_def, uint8_t *csr, size_t *csr_size)</div><div class="ttdoc">Creates a CSR specified by the CSR definition from the ATECC508A device. This process involves readin...</div><div class="ttdef"><b>Definition:</b> atcacert_client.c:273</div></div>
<div class="ttc" id="a00990_html_ga0b492025e27a705b1792b6276eeaaf68"><div class="ttname"><a href="a00990.html#ga0b492025e27a705b1792b6276eeaaf68">atcacert_create_csr_pem</a></div><div class="ttdeci">int atcacert_create_csr_pem(const atcacert_def_t *csr_def, char *csr, size_t *csr_size)</div><div class="ttdoc">Creates a CSR specified by the CSR definition from the ATECC508A device. This process involves readin...</div><div class="ttdef"><b>Definition:</b> atcacert_client.c:237</div></div>
<div class="ttc" id="a00990_html_ga9f7223a578ce5c07a831638106c6ff6c"><div class="ttname"><a href="a00990.html#ga9f7223a578ce5c07a831638106c6ff6c">atcacert_get_response</a></div><div class="ttdeci">int atcacert_get_response(uint8_t device_private_key_slot, const uint8_t challenge[32], uint8_t response[64])</div><div class="ttdoc">Calculates the response to a challenge sent from the host.</div><div class="ttdef"><b>Definition:</b> atcacert_client.c:46</div></div>
<div class="ttc" id="a01061_html"><div class="ttname"><a href="a01061.html">atcacert_def_s</a></div><div class="ttdef"><b>Definition:</b> atcacert_def.h:171</div></div>
<div class="ttc" id="a00990_html_gaaf13dfd0ea4e563194cec6e62892b5c4"><div class="ttname"><a href="a00990.html#gaaf13dfd0ea4e563194cec6e62892b5c4">atcacert_read_cert</a></div><div class="ttdeci">int atcacert_read_cert(const atcacert_def_t *cert_def, const uint8_t ca_public_key[64], uint8_t *cert, size_t *cert_size)</div><div class="ttdoc">Reads the certificate specified by the certificate definition from the ATECC508A device.</div><div class="ttdef"><b>Definition:</b> atcacert_client.c:111</div></div>
<div class="ttc" id="a01049_html"><div class="ttname"><a href="a01049.html">atcacert_device_loc_s</a></div><div class="ttdef"><b>Definition:</b> atcacert_def.h:135</div></div>
<div class="ttc" id="a00194_html"><div class="ttname"><a href="a00194.html">atcacert_def.h</a></div><div class="ttdoc">Declarations for certificates related to ECC CryptoAuthentication devices. These are the definitions ...</div></div>
<div class="ttc" id="a00990_html_ga9a6222ede3a3f3f331882b613066b8a8"><div class="ttname"><a href="a00990.html#ga9a6222ede3a3f3f331882b613066b8a8">atcacert_read_device_loc</a></div><div class="ttdeci">int atcacert_read_device_loc(const atcacert_device_loc_t *device_loc, uint8_t *data)</div><div class="ttdoc">Read the data from a device location.</div><div class="ttdef"><b>Definition:</b> atcacert_client.c:58</div></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="dir_97aefd0d527b934f1d99a682da8fe6a9.html">lib</a></li><li class="navelem"><a class="el" href="dir_26647cdac0a1f8c717d44b4eb3b4ec89.html">atcacert</a></li><li class="navelem"><a class="el" href="a00182.html">atcacert_client.h</a></li>
    <li class="footer">Generated by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.15 </li>
  </ul>
</div>
</body>
</html>
